Skip to content

Conversation

bentsherman
Copy link
Member

Close #49

Testing support for slashy interpolated strings, which can be useful for defining an interpolated regex without needing as many escapes.

TODO:

  • provide an example that shows the benefit over a regular interpolated string

Signed-off-by: Ben Sherman <bentshermann@gmail.com>
@bentsherman
Copy link
Member Author

This case doesn't work:

id = 'SRA001'
println /${id}.fastq/

It gives Unexpected input: '<EOF>' at the end of the script

Adding parentheses is a workaround:

id = 'SRA001'
println(/${id}.fastq/)

But still the slashy string isn't being parsed correctly:

GStringExpression(2:9-2:21)
  ConstantExpression(2:11-2:20)

It is parsing the string contents as plain text rather than the ${id} expression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support slashy interpolated strings

1 participant